#include <stdio.h>
#include <unistd.h>
#include "../../app/app_common.h"

int sqr(int n)
{
    sleep(1);
    int sum = 0;
    sum = n * n;
    return sum;
}

int main(int argc, char const *argv[])
{
    int items[5] = {10, 20, 30, 40, 50};
    int sum = 0;
    long start = App_Common_GetCurrentTime();
    for (int i = 0; i < (sizeof(items) / sizeof(int)); i++)
    {
        sum += sqr(items[i]);
    }
    long end = App_Common_GetCurrentTime();
    printf("sum:%d,time:%ld\n", sum, (end - start) / 1000);
    return 0;
}
